package com.rental.common.result;

import lombok.Getter;

@Getter
public enum ResultCodeEnum {
    SUCCESS(200, "成功"),

    LOGIN_AUTH(201, "未登录"),
    PERMISSION_ERROR(202, "权限认证失败"),
    VALIDATE_CODE_ERROR(203, "验证码错误"),
    VALIDATE_CODE_NOT_EXIST(203, "验证码不存在"),
    PHONE_NOT_EXIST(204, "手机号不存在"),
    PHONE_ERROR(204, "手机号格式错误"),
    CODE_ERROR(204, "验证码格式错误"),
    TOKEN_EXPIRE(203, "token过期"),
    TOKEN_ERROR(204, "token错误"),
    LOGIN_NULL(205, "登录信息为空"),
    REGISTER_ERROR(206, "注册失败"),

    DATABASE_NULL(210, "数据库返回空"),
    DATABASE_INSERT_ERROR(210, "数据库插入失败"),
    DATABASE_STATE_NOT_ZERO(211, "无法删除未下架信息"),

    QUICKEN_ADD_ERROR(221, "加速值增加失败"),


    FAIL(400, "失败"),
    Not_Enough(406, "余额不足"),

    NO_USER (501, "用户不存在"),
    NO_USER_ACCOUNT(556,"用户账户未初始化"),
    In_REAL_NAME (509, "用户已实名"),
    REAL_NAME_OK (666, "用户已实名"),

    ERROR(500, "系统错误"),

    QUICKEN_NOT_ENOUGH(909, "加速值不足");

    private Integer code;
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
